$(function(){
  //表格
  var container = document.getElementById('main');
  
  var data = [
    ['Java','1','降','-0.01%'],
    ['C','2','升','+2.44%'],
    ['Python','3','升','+1.41%'],
    ['C++','4','降','-2.58%'],
    ['C#','5','升','+2.07%'],
    ['Visual Basic.Net','6','降','-1.17%'],
    ['JavaScript','7','降','-0.85%']
  ];

  
  

  var hot = new Handsontable(container,{
    data: data,
    colHeaders: ['语言名称','排名','升或降','变化幅度'],
    filters: true,
  })


  //曲线
  var myChart = echarts.init(document.getElementById('main1'));

  var option = {
    title: {
      text: 'JavaScript语言排名变化'
    },
    tooltip: {},
    legend: {
      data: ['销量']
    },
    xAxis: {
      data: ['2020','2005','2010','2015','2020']
    },
    yAxis: {},
    series: [{
      name: '排名',
      type: 'line',
      data: [6,9,8,8,7]
    }]
  };

  myChart.setOption(option);

});
